{weiget frontend_weiget/header}

	 <section>
         <!-- Page content-->
         <div class="content-wrapper">
            <h3>更新字段
               <small>可以自定义字段类型</small>
            </h3>
            <!-- START panel-->
            <div class="panel panel-default">
               <div class="panel-body">
                  <form method="post" action="{SELF_URL}former/updatefield/?id={$fieldInfo[fieldid]}" class="form-horizontal">
                     <fieldset>
                        <legend>基础信息 - 属于（<a href="{SELF_URL}former/updateprototype/?id={$prototypeInfo[prototypeid]}"><!--{$prototypeInfo[title]}--></a>）原型</legend>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">唯一标记</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="必须输入英文" name="field[name]" class="form-control form-control-rounded" data-parsley-minlength="4" value="{$fieldInfo[name]}">
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">绑定原型</label>
                           <div class="col-sm-6">
                              <select name="field[bindingid]" class="chosen-select form-control">
                                 <option value="0">无</option>
							  <!--{loop $prototypes $prototype}-->
							  <!--{if $prototype[prototypeid] == $prototypeid}-->
							  <!--{else}-->
								 <!--{if $prototype[prototypeid] == $fieldInfo[bindingid]}-->
                                 <option value="{$prototype[prototypeid]}" selected="selected"><!--{$prototype[title]}--></option>
								 <!--{else}-->
                                 <option value="{$prototype[prototypeid]}"><!--{$prototype[title]}--></option>
								 <!--{/if}-->
							  <!--{/if}-->
							  <!--{/loop}-->
                              </select>
                           </div>
                           <div class="col-sm-4">最高优先级产生关联</div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">名称</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="不能为空，最好是中文" name="field[title]" class="form-control" data-parsley-minlength="4" value="{$fieldInfo[title]}">
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">类型</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="text,varchar,int" name="field[sort]" class="form-control" value="{$fieldInfo[sort]}">
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">输入框类型</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="text,textarea" name="field[formtype]" class="form-control" value="{$fieldInfo[formtype]}">
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">字段长度</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="请输入数字" name="field[size]" class="form-control" value="{$fieldInfo[size]}">
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">描述</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="不超过100字" name="field[note]" class="form-control" value="{$fieldInfo[note]}">
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">排序</label>
                           <div class="col-sm-6">
                              <input type="text" placeholder="输入数字，数字越大越靠前" name="field[listorder]" class="form-control" value="{$fieldInfo[listorder]}">
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>
                     <fieldset>
                        <div class="form-group">
                           <label class="col-sm-2 control-label">是否列表显示</label>
                           <div class="col-sm-6">
                              <select name="field[showinlist]" class="chosen-select form-control">
							  <!--{if $fieldInfo[showinlist] > 0}-->
                                 <option value="1" selected="selected">显示</option>
                                 <option value="0">不显示</option>
							  <!--{else}-->
                                 <option value="1">显示</option>
                                 <option value="0" selected="selected">不显示</option>
							  <!--{/if}-->
                              </select>
                           </div>
                           <div class="col-sm-4"></div>
                        </div>
                     </fieldset>

                     <fieldset>
                        <div class="form-group">
                           <div class="col-sm-4 col-sm-offset-2">
						   <input type="hidden" name="dosubmit" value="1">
                              <button type="submit" class="btn btn-primary">保存</button>
                           </div>
                        </div>
                     </fieldset>
                  </form>
               </div>
            </div>
            <!-- END panel-->
         </div>
      </section>

{weiget frontend_weiget/footer}